﻿using System;

namespace Manox.Libs.Networking
{
    /// <summary>
    /// Inetwork client.
    /// </summary>
    public interface INetworkClient : INetworkNode
    {
        /// <summary>
        /// Send data.
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="data"></param>
        /// <param name="dataLength"></param>
        void Send(byte[] data, int dataLength);

        /// <summary>
        /// Get matches.
        /// </summary>
        /// <param name="responseAction"></param>
        void GetMatches(Action<INetworkMatch> responseAction);

        /// <summary>
        /// Connect.
        /// </summary>
        /// <param name="match"></param>
        /// <param name="password"></param>
        /// <param name="joinedAction"></param>
        void Connect(INetworkMatch match, string password, NetworkResponseDelegate<bool> joinedAction);
    }
}
